home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / comm / mail / ML-Support.lha / ML-Support / ML-Support.install < prev    next >
Encoding:
Text File  |  1999-06-16  |  11.8 KB  |  301 lines

  1. ;
  2. ; Script d'intallation pour ML-Support 2.0+  ©1998-1999 Christian Hattemer
  3. ;
  4. ; $VER : 1.11 (15-06-99) ©1999 Herve.Dupont@nordnet.fr
  5. ;
  6. ; Current languages : English, French, Italiano & Deutsch.
  7. ;
  8. ;===========================================================================
  9.  
  10. ; Variables par défaut :
  11.  
  12. (SET #L_English    0 )
  13. (SET #L_Français   1 )
  14. (SET #L_Italiano   2 )
  15. (SET #L_Deutsch    3 )
  16.  
  17. (SET #Mod_Thor  0)
  18. (SET #Mod_YAM   1)
  19. ;(SET #Mod_Micr  2)
  20.  
  21.  
  22. ; **** -> Anglais   (0 - Défaut)
  23.  
  24. (SET #Def_lang #L_English #Def_doc #L_English)
  25.  
  26. (set #wrongCPU "\nML-Support needs at least a 68020 CPU to run !\n")
  27. (set #wrongOS  "\nML-Support needs at least OS 3.0 to run !\n")
  28. (set #wrongMUI "\nML-Support needs at least MUI 3.3 to run !\n")
  29.  
  30. (set #Msg_dir "\nChoose ML-Support home directory\n(A drawer called \"ML-Support\" will be created!)")
  31. (set #Msg_cat "\nWhich catalog file do you want to install?\n(English language is built-in)")
  32. (set #Msg_doc "\nSelect language for on-line AmigaGuide help")
  33. (SET #Msg_mod "\nWhich module(s) (Plug-In) do you want to install?")
  34.  
  35. (SET #Cre_dir "\nCreating \"%s\" directory...")
  36. (SET #Msg_cfg "\nDo you want to install a minimal\n list of MLs?")
  37. (SET #Help_dir (CAT "\nChoose where you wish to install ML-Support.\n"
  38.            "A great place should be near your mailers drawer, but you can put it"
  39.            " where you want.\n\n"
  40.            "Again a \"ML-Support\" drawer will be created."))
  41. (SET #Help_mod (CAT "\nSelect one or more modules which correspond to the mailer you use.\n"
  42.            "Modules are copied into a \"MUI\" drawer in the \"ML-Support\" directory."))
  43. (SET #Msg_exist "\nA configuration file already exists!\n\nDo you still want to copy the file provided with this archive?\n\nThe old one will be renamed with the SuffixOld \'_Bak\'.\n")
  44. (SET #Help_choix "\nIf you choose to install the configuration file, the older one will be renamed \"ML-Support.cfg_Bak\".")
  45. (SET #Msg_tool "\nChoose the WB ToolType you wish set in icon :\n")
  46. (SET #Pour "For ")
  47. (SET #Help_Nil "")
  48.  
  49. ; -------------------------------------------------------------------
  50. ; **** -> Français  (1)
  51.  
  52. (IF (= @language "français")
  53. (
  54. (SET #Def_lang #L_Français  #Def_doc #L_Français)
  55.  
  56. (SET #wrongCPU "Il vous faut au moins un 68020 !\n")
  57. (SET #wrongOS  "Il vous faut au moins le système 3.0 !\n")
  58. (SET #wrongMUI "Il vous faut au moins MUI 3.3 !\n")
  59.  
  60. (SET #Msg_dir "\nOù voulez-vous installer ML-Support ?\nUn répertoire \"ML-Support\" sera crée.\n")
  61. (SET #Msg_cat "\nQuel langage voulez-vous installer ?\nL'Anglais est en interne.\n")
  62. (SET #Msg_doc "\nQuelle documentation voulez-vous installer ?\n")
  63. (SET #Msg_mod "\nQuelle(s) module(s) voulez-vous installer ?\n")
  64.  
  65. (SET #Cre_dir "Création du répertoire \"%s\"...")
  66. (SET #Msg_cfg "\nVoulez-vous installer une configuration initiale\nde liste de distribution ?")
  67.  
  68. (SET #Help_dir (CAT "\nChoisissez l'endroit où vous souhaitez installer ML-Support.\n"
  69.            "Il n'y a aucune contrainte de ce côté là, mais l'endroit le"
  70.            " mieux adapté est peut-être à côté des répertoires de vos programmes"
  71.            " de courrier électronique.\n\n Je vous rappel qu'un répertoire \'ML-Support\' sera crée."))
  72. (SET #Help_mod (CAT "\nChoisissez, le ou les modules qui correspondent aux programmes que vous utilisés.\n"
  73.            "Les modules seront copiés dans un répertoire \"MUI\" crée dans \"ML-Support\"."))
  74. (SET #Msg_exist "\nUn fichier de configuration existe déjà !\n\nVoulez-vous quand même copier celui fournit avec ML-Support ?\n\nL'ancien se vera ajouter le suffixe \'_Bak\'.\n")
  75. (SET #Help_choix "\n Si vous choisissez d'installer le fichier\n de configuration,\n votre ancien fichier sera renommé\n \'ML-Support.cfg_Bak\'.")
  76. (SET #Msg_tool "\nChoisissez l'outil (ToolType) WB à positionner dans l'îcone de ML-Support:\n")
  77. (SET #Pour "Pour ")
  78.  
  79. )) ; Fin IF
  80.  
  81. ; -------------------------------------------------------------------
  82. ; **** -> Italien   (2)
  83.  
  84. (if (= @language "italiano")
  85. (
  86.  ;(SET #Def_lang #L_Italiano  #Def_doc #L_Italiano) ; Normal way
  87.  (SET #Def_lang #L_Italiano  #Def_doc #L_English) ; Current way
  88. (set #wrongCPU "\nML-Support necessita almeno della CPU 68020 per funzionare!\n")
  89. (set #wrongOS  "\nML-Support necessita almeno dell'OS3.0 per funzionare!\n")
  90. (set #wrongMUI "\nML-Support necessita almeno della MUI3.3 per funzionare!\n")
  91.  
  92. (set #Msg_dir "\nScegli la directory dove risiede ML-Support\n(Un cassetto chiamato \"ML-Support\" sarà creato!)")
  93. (set #Msg_cat "\nQuale catalogo vuoi installare?\n(L'inglese è interno al programma)")
  94. (set #Msg_doc "\nSeleziona la lingua per l'aiuto in linea")
  95. (SET #Msg_mod "\nQuale modulo (Plug-In) vuoi installare?")
  96.  
  97. (SET #Cre_dir "\nSto creando la directory \"%s\"...")
  98. (SET #Msg_cfg "\nVuoi installare una lista \n minima delle ML?")
  99. (SET #Help_dir (CAT "\nScegli dove vuoi installare ML-Support.\n"
  100.            "Una allocazione preferibile dovrebbe essere vicino al cassetto del tuo mailer, ma puoi porlo"
  101.            " dove preferisci.\n\n"
  102.            "Di nuovo un cassetto \"ML-Support\" sarà creato."))
  103. (SET #Help_mod (CAT "\nSeleziona uno o più moduli che corrispondono ai mailer che usi.\n"
  104.            "I moduli sono copiati dentro un cassetto \"MUI\" nella directory \"ML-Support\"."))
  105. (SET #Msg_exist "\nUn file di configurazione già esiste!\n\nVuoi continuare a copiare il file fornito con questo archivio?\n\nIl precedente sarà rinominato con il suffisso \'_Bak\'.\n")
  106. (SET #Help_choix "\nSe scegli di installare la configurazione, la più vecchia sarà rinominata \"ML-Support.cfg_Bak\".")
  107. (SET #Msg_tool "\nScegli il WB ToolType che desideri nelle impostazioni nell'icona :\n")
  108. (SET #Pour "Per ")
  109.  
  110. ))
  111. ; -------------------------------------------------------------------
  112. ; **** -> Allemand  (3)
  113.                    
  114. (if (= @language "deutsch")
  115. (
  116. ; (SET #Def_lang #L_Deutsch  #Def_doc #L_Deutsch) ; Normal way
  117. (SET #Def_lang #L_Deutsch  #Def_doc #L_English) ; Current way
  118.  
  119. (set #wrongCPU "\nML-Support benötigt mindestens eine 68020 CPU!\n")
  120. (set #wrongOS  "\nML-Support benötigt mindestens OS 3.0!\n")
  121. (set #wrongMUI "\nML-Support benötigt mindestens MUI 3.3!\n")
  122.  
  123. (set #Msg_dir "\nIn welchem Verzeichnis soll ML-Support installiert werden?\n(Ein Verzeichnis namens \"ML-Support\" wird erstellt!)")
  124. (set #Msg_cat "\nWelche Katalogdateien sollen installiert werden?\n(Für Englisch wird keine Datei benötigt.)")
  125. (set #Msg_doc "\nIn welcher Sprache soll die AmigaGuide Dokumentation installiert werden?")
  126. (SET #Msg_mod "\nWelche Mailerzeugermodule sollen installiert werden?")
  127.  
  128. (SET #Cre_dir "\nErzeuge Verzeichnis \"%s\"...")
  129. (SET #Msg_cfg "\nSoll eine Konfiguration mit\n einigen MLs installiert werden?")
  130. (SET #Help_dir (CAT "\nWähle wo ML-Support installiert werden soll.\n"
  131.            "Ein guter Platz wäre nahe dem Verzeichnis des Mailers,"
  132.            " es kann aber überall installiert werden.\n\n"
  133.            "Das Verzeichnis \"ML-Support\" wird automatisch erzeugt."))
  134. (SET #Help_mod (CAT "\nWähle ein oder mehrere Mailerzeugermodule die den Mailern entsprechen, mit denen ML-Support benutzt werden soll.\n"
  135.            "Die Module werden in das Verzeichnis \"MUI\" im \"ML-Support\" Verzeichnis kopiert."))
  136. (SET #Msg_exist "\nEs existiert bereits eine Konfiguration!\n\nSoll wirklich die in diesem Archiv enthaltene Datei installiert werden?\n\nDie bestehende Datei wird umbennannt. (Suffix \'_Bak\')\n")
  137. (SET #Help_choix "\nWenn die neue Konfiguration installiert werden soll wird die bestehende umbenannt in \"ML-Support.cfg_Bak\".")
  138. (SET #Msg_tool "\nFür welchen Mailer soll das ToolType im ML-Support Icon gesetzt werden?\n")
  139. (SET #Pour "Für ")
  140.  
  141. ))
  142.  
  143. ; -------------------------------------------------------------------
  144.  
  145. ; -------------------------------------------------------------------
  146. ;=======================  <*  SCRIPT  *> ============================
  147. ; -------------------------------------------------------------------
  148.  
  149. ;**** Vérifie environnement
  150.  
  151. (set Type_CPU (database "cpu"))
  152. (if (< Type_CPU "68020") (abort #wrongCPU))
  153.  
  154. (set OS_ver (getversion "exec.library" (resident)))
  155. (if (< OS_ver (* 39 65536)) (abort #wrongOS))
  156.  
  157. (set MUI_ver (getversion "MUI:libs/muimaster.library"))
  158. (if (AND (< MUI_ver (* 14 65536)) (<> MUI_ver 0)) (abort #wrongMUI))
  159.  
  160. ; **** Questionnaire
  161.  
  162. (SET #ML_dir
  163.     (askdir
  164.           (default @default-dest)
  165.           (prompt  #Msg_dir)
  166.           (help    #Help_dir) )
  167. )
  168. (SET #ML_dir (TACKON #ML_dir "ML-Support"))
  169. (SET @default-dest #ML_dir)
  170.  
  171. (SET #H_Langage (askchoice
  172.     (PROMPT  #Msg_cat)
  173.     (HELP    @askchoice-help)
  174.     (CHOICES
  175.          "English"
  176.          "Français"
  177.          "Italiano"
  178.          "Deutsch"
  179.     )
  180.     (DEFAULT #Def_lang)
  181.            )
  182. )
  183. (COMPLETE 10)
  184.  
  185. (SET #H_Guide (askchoice
  186.     (PROMPT #Msg_doc)
  187.     (HELP   @askchoice-help)
  188.     (CHOICES
  189.          "AmigaGuide (English)"
  190.          "AmigaGuide (Français)"
  191. "";             "AmigaGuide (Italiano)"
  192. "";             "AmigaGuide (Deutsch)"
  193.     )
  194.     (DEFAULT #Def_doc)
  195.          )
  196. )
  197. (COMPLETE 20)
  198.  
  199. (WHILE (= #H_module 0)
  200. (
  201.   (SET #H_Module (askoptions
  202.       (PROMPT #Msg_mod)
  203.       (HELP   #Help_mod)
  204.       (CHOICES
  205. "";               "Thor"  ; a retirer si Thor arrive (To remove if Thor comes)
  206.            "YAM"
  207.       )
  208.       (DEFAULT 0)
  209.            )
  210.   )
  211. ));
  212. (COMPLETE 30)
  213.  
  214. ; Recherche + trf option (1-2-4..) -> N° choix (Si choix unique) (0-1-2..)
  215. (SET #vt #H_module)
  216. (SET #count 0)
  217. (SET #n 0)
  218. (SET #Def_tool 0)
  219. (WHILE (< #n 8)
  220.  (
  221.   (IF (BITAND #vt 1)
  222.     ( (SET #Def_tool #n)
  223.       (SET #count (+ 1 #count))
  224.   ))
  225.   (SET #vt (SHIFTRIGHT #vt 1))
  226.   (SET #n (+ 1 #n))
  227. ))
  228.  
  229. (SET #H_tool #Def_tool) ; initialiser #H_tool si count <=1
  230. (IF (> #count 1)
  231.   (SET #H_Tool (askchoice
  232.       (PROMPT #Msg_tool)
  233.       (HELP   @askchoice-help)
  234.       (CHOICES
  235. "";               (CAT #Pour "Thor")
  236.            (CAT #Pour "YAM")
  237.       )
  238.       (DEFAULT #Def_tool)
  239.            )
  240.   )
  241. );
  242.  
  243. ; **** Installation (dir)
  244.  
  245. (MAKEDIR #ML_dir (PROMPT (#Cre_dir "ML-Support")) (INFOS))
  246.  
  247. (SET #Cat_dir (tackon #ML_dir "Catalogs"))
  248. (IF (NOT (EXISTS #Cat_dir)) (MAKEDIR #Cat_dir (PROMPT (#Cre_dir "Catalogs"))) )
  249. (COPYFILES (source "Catalogs/ML_Support.cd") (dest #Cat_dir))
  250.  
  251. (IF (> #H_Langage 0)
  252. (
  253.    (if (= #H_langage #L_Français)
  254.        (copyfiles (source (tackon "Catalogs" "français")) (ALL) (dest (tackon #Cat_dir "français")))
  255.    )
  256.    (if (= #H_langage #L_Italiano)
  257.        (copyfiles (source (tackon "Catalogs" "italiano")) (ALL) (dest (tackon #Cat_dir "italiano")))
  258.    )
  259.    (if (= #H_langage #L_Deutsch )
  260.        (copyfiles (source (tackon "Catalogs" "deutsch"))  (ALL) (dest (tackon #Cat_dir "deutsch")))
  261.    )
  262. ))
  263. (COMPLETE 40)
  264. (IF (= #H_Guide #L_English)  (copyfiles (source "ML-Support_En.guide") (dest #ML_dir) (infos)))
  265. (IF (= #H_Guide #L_Français) (copyfiles (source "ML-Support_Fr.guide") (dest #ML_dir) (infos)))
  266. (IF (= #H_Guide #L_Italiano) (copyfiles (source "ML-Support_It.guide") (dest #ML_dir) (infos)))
  267. (IF (= #H_Guide #L_Deutsch)  (copyfiles (source "ML-Support_De.guide") (dest #ML_dir) (infos)))
  268. (COMPLETE 60)
  269. (SET #ML_dir_mui (TACKON #ML_dir "MUI")) ; ATTENTION à l'ordre !!
  270. (IF (BITAND #H_module 1) (COPYFILES (source "MUI/Thor.mcc") (Dest #ML_dir_mui)))
  271. (IF (BITAND #H_module 2) (COPYFILES (source "MUI/YAM.mcc")  (Dest #ML_dir_mui)))
  272. (COMPLETE 80)
  273.  
  274. (COPYFILES (source "ML-Support") (dest #ML_dir) (INFOS))
  275.  
  276. ;Ajouter ici les autres modules...
  277. (IF (= #H_tool 0) (TOOLTYPE (SETTOOLTYPE "CREATOR" "Thor.mcc") (DEST (TACKON #ML_dir "ML-Support")) ) )
  278. (IF (= #H_tool 1) (TOOLTYPE (SETTOOLTYPE "CREATOR" "YAM.mcc" ) (DEST (TACKON #ML_dir "ML-Support")) ) )
  279.  
  280. (IF (EXISTS (TACKON #ML_dir "ML-Support.cfg"))
  281.  (
  282.   (SET #Choix (ASKBOOL (PROMPT #Msg_exist) (HELP #Help_choix) (DEFAULT 0)))
  283.   (IF (= #Choix 1)
  284.    (
  285.    (RENAME (tackon #ML_dir "ML-Support.cfg") (tackon #ML_dir "ML-Support.cfg_Bak"))
  286.    (COPYFILES (source "ML-Support.cfg") (dest #ML_dir) (PROMPT #Msg_cfg) (help @copyfiles-help))
  287.    )
  288.   )
  289.  )
  290.  (
  291.   (IF (= 1 (SET #Choix (ASKBOOL (PROMPT #Msg_cfg) (HELP @#Help_Nil) (DEFAULT 1))) )
  292.   (COPYFILES (source "ML-Support.cfg") (dest #ML_dir) (PROMPT #Msg_cfg) (help @copyfiles-help))
  293.   )
  294.  )
  295. );
  296. (COMPLETE 100)              
  297.  
  298. ; -------------------------------------------------------------------
  299. ; -------------------------- FIN DE SCRIPT --------------------------
  300. ; -------------------------------------------------------------------
  301.